package ee.helmesWorkTest.frontend.controller.command;

import org.apache.log4j.Logger;

public class PersonSectorInvolvementCommandFactory 
{
	private Logger logger = Logger.getLogger(PersonSectorInvolvementCommandFactory.class);
	
	public Command getCommand(String triggeringEvent)
	{
		Command command = null;
		
		try 
		{
			if (triggeringEvent.equals("insertPersonSectorInvolvementPage"))
			{
				command = new FillInsertPersonSectorInvolvementWithSessionDataCommand();
			}
			
			if (triggeringEvent.equals("insertPersonSectorInvolvementFormPostEvent"))
			{
				command = new InsertPersonSectorInvolvementCommand();
			}
		}
		catch (Exception e)
		{
			logger.warn(e.getMessage());
		}
		
		return command;
	}
}